/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By 深圳中科鑫智科技有限公司
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.business.service.role.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shop.cereshop.business.dao.role.CereBusinessRoleDAO;
import com.shop.cereshop.business.dao.role.CerePlatformRoleDAO;
import com.shop.cereshop.business.service.role.CereBusinessRoleService;
import com.shop.cereshop.commons.domain.role.CereBusinessRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CereBusinessRoleServiceImpl extends ServiceImpl<CereBusinessRoleDAO, CereBusinessRole> implements CereBusinessRoleService {

    @Autowired
    private CerePlatformRoleDAO CereBusinessRoleDAO;

    @Override
    public CereBusinessRole queryByDesc(String roleDescribe) {
        LambdaQueryWrapper<CereBusinessRole> q1 = new LambdaQueryWrapper<>();
        q1.eq(CereBusinessRole::getRoleDescribe,roleDescribe);
        return getOne(q1);
    }

    @Override
    public CereBusinessRole queryByRoleName(String roleName) {
        LambdaQueryWrapper<CereBusinessRole> q1 = new LambdaQueryWrapper<>();
        q1.eq(CereBusinessRole::getRoleName,roleName);
        return getOne(q1);
    }
}
